package DomainModel;

/**
 *
 * @author PRATAP/Patrick
 */

public enum SemesterType {
    
    FALL (6,"Fall"),
    WINTER (5, "Winter"),
    SPRING (4, "Spring"),
    SUMMER_A (3,"Summer A"), 
    SUMMER_B (2, "Summer B"),
    SUMMER_C (1, "Summer C");
    
    private int semesterTypeId;
    private String semesterName;
    
    private SemesterType(int pSemesterTypeId, String pSemesterName){
        this.semesterTypeId = pSemesterTypeId;
        this.semesterName= pSemesterName;
    }
            
    public int getSemesterTypeId() {
        return semesterTypeId;
    }

    public String getSemesterName() {
        return semesterName;
    }

    public void setSemesterTypeId(int semesterTypeId) {
        this.semesterTypeId = semesterTypeId;
    }
     
    public void setSemesterName(String semesterName) {
        this.semesterName = semesterName;
    }
    
    
    public static SemesterType getSemesterTypeById(int pSemesterTypeId) {
        switch(pSemesterTypeId) {
            case 6: return SemesterType.FALL;
            case 5: return SemesterType.WINTER;   
            case 4: return SemesterType.SPRING;
            case 3: return SemesterType.SUMMER_A;
            case 2: return SemesterType.SUMMER_B;
            case 1: return SemesterType.SUMMER_C;    
        }
        return null;
    } 
}
